package com.cjh.controller;

import com.cjh.DemoDubboService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 *com.cjh.controller
 *2024/7/23 11:38
 *
 *@author chenjh
 */
@RestController
public class TestController {
    @DubboReference
    private DemoDubboService demoDubboService;

    @ResponseBody
    @GetMapping("dubbo/test1")
    public String test1() {
        demoDubboService.delay100("");
        return "success";
    }

    @ResponseBody
    @GetMapping("dubbo/test2")
    public String test2() {
        demoDubboService.delay500("");
        return "success";
    }
}
